// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TaxCalculationRate generated by hbm2java
 */
@Entity
@Table(name = "tax_calculation_rate", catalog = "magento")
public class TaxCalculationRate implements java.io.Serializable {
	private static final long serialVersionUID = 121323L;

	private Integer taxCalculationRateId;
	private String taxCountryId;
	private int taxRegionId;
	private String taxPostcode;
	private String code;
	private BigDecimal rate;
	private Short zipIsRange;
	private Integer zipFrom;
	private Integer zipTo;
	private Set taxCalculations = new HashSet(0);
	private Set taxCalculationRateTitles = new HashSet(0);

	public TaxCalculationRate() {
	}

	public TaxCalculationRate(String taxCountryId, int taxRegionId,
			String code, BigDecimal rate) {
		this.taxCountryId = taxCountryId;
		this.taxRegionId = taxRegionId;
		this.code = code;
		this.rate = rate;
	}

	public TaxCalculationRate(String taxCountryId, int taxRegionId,
			String taxPostcode, String code, BigDecimal rate, Short zipIsRange,
			Integer zipFrom, Integer zipTo, Set taxCalculations,
			Set taxCalculationRateTitles) {
		this.taxCountryId = taxCountryId;
		this.taxRegionId = taxRegionId;
		this.taxPostcode = taxPostcode;
		this.code = code;
		this.rate = rate;
		this.zipIsRange = zipIsRange;
		this.zipFrom = zipFrom;
		this.zipTo = zipTo;
		this.taxCalculations = taxCalculations;
		this.taxCalculationRateTitles = taxCalculationRateTitles;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "tax_calculation_rate_id", unique = true, nullable = false)
	public Integer getTaxCalculationRateId() {
		return this.taxCalculationRateId;
	}

	public void setTaxCalculationRateId(Integer taxCalculationRateId) {
		this.taxCalculationRateId = taxCalculationRateId;
	}

	@Column(name = "tax_country_id", nullable = false, length = 2)
	public String getTaxCountryId() {
		return this.taxCountryId;
	}

	public void setTaxCountryId(String taxCountryId) {
		this.taxCountryId = taxCountryId;
	}

	@Column(name = "tax_region_id", nullable = false)
	public int getTaxRegionId() {
		return this.taxRegionId;
	}

	public void setTaxRegionId(int taxRegionId) {
		this.taxRegionId = taxRegionId;
	}

	@Column(name = "tax_postcode", length = 21)
	public String getTaxPostcode() {
		return this.taxPostcode;
	}

	public void setTaxPostcode(String taxPostcode) {
		this.taxPostcode = taxPostcode;
	}

	@Column(name = "code", nullable = false)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "rate", nullable = false, precision = 12, scale = 4)
	public BigDecimal getRate() {
		return this.rate;
	}

	public void setRate(BigDecimal rate) {
		this.rate = rate;
	}

	@Column(name = "zip_is_range")
	public Short getZipIsRange() {
		return this.zipIsRange;
	}

	public void setZipIsRange(Short zipIsRange) {
		this.zipIsRange = zipIsRange;
	}

	@Column(name = "zip_from")
	public Integer getZipFrom() {
		return this.zipFrom;
	}

	public void setZipFrom(Integer zipFrom) {
		this.zipFrom = zipFrom;
	}

	@Column(name = "zip_to")
	public Integer getZipTo() {
		return this.zipTo;
	}

	public void setZipTo(Integer zipTo) {
		this.zipTo = zipTo;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "taxCalculationRate")
	public Set getTaxCalculations() {
		return this.taxCalculations;
	}

	public void setTaxCalculations(Set taxCalculations) {
		this.taxCalculations = taxCalculations;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "taxCalculationRate")
	public Set getTaxCalculationRateTitles() {
		return this.taxCalculationRateTitles;
	}

	public void setTaxCalculationRateTitles(Set taxCalculationRateTitles) {
		this.taxCalculationRateTitles = taxCalculationRateTitles;
	}

}
